<?php
$settings = array(
    'formId' => 'register',
    'form' => array(
        'action' => '',
        'method' => 'post',
        'class' => array(),
        'accept-charset' => 'utf-8',
        'role' => 'form',
        'id' => 'register',
    ),
    'username' => array(
        'label' => '用户名',
        'userOptions' => array(),
        'error' => '',
        'description' => '用户昵称',
        'field' => 'string',
        'widget' => 'Text',
        'validate' => array(),
        'attributes' => array(),
        'required' => true,
    ),
    'email' => array(
        'label' => '邮箱',
        'userOptions' => array(),
        'error' => '',
        'description' => '您正在使用的邮箱',
        'field' => 'string',
        'widget' => 'Text',
        'validate' => array(),
        'attributes' => array(),
        'required' => true,
    ),
    'password' => array(
        'label' => '密码',
        'userOptions' => array(),
        'error' => '',
        'description' => '登陆密码',
        'field' => 'string',
        'widget' => 'Password',
        'validate' => array(),
        'attributes' => array(),
        'required' => true,
    ),
    'confirmPassword' => array(
        'label' => '确认密码',
        'userOptions' => array(),
        'error' => '',
        'description' => '重复之前输入的密码',
        'field' => 'string',
        'widget' => 'Password',
        'validate' => array(
            array(
                'v' => 'Confirmation',
                'with' => 'password',
                'message' => '前后输入的密码不一样',
            ),
        ),
        'attributes' => array(),
        'required' => true,
    ),
    'verCode' => array(
        'label' => '验证码',
        'userOptions' => array(),
        'error' => '',
        'description' => '请你输入你看到的验证码',
        'field' => 'validateCode',
        'widget' => 'ValidateCode',
        'validate' => array(
            array(
                'v' => 'Function',
                'function' => '\Core\Library\ValidateCode::validate',
                'message' => '验证码输入错误',
            ),
        ),
        'validate' => array(),
        'attributes' => array(),
        'required' => true,
    ),
    'xieyi' => array(
        'label' => '已经阅读并同意《服务协议》',
        'userOptions' => array(),
        'error' => '',
        'description' => '已经阅读并同意《服务协议》',
        'field' => 'boole',
        'widget' => 'Checkbox',
        'validate' => array(),
        'validate' => array(),
        'value' => 'on',
        'attributes' => array(),
        'required' => true,
    ),
    'settings' => array(
        'save' => '\Modules\User\Library\Common::register',
    ),
);
